<?php
function mod_main($auth,$adminauth,$login)
{
$qs="http://arena.pcdev.h0c.ru/?do=game/mods/index&mid=$_GET[mid]";
if($_GET['style']!="2")
{
echo "
<html>
<head>
<meta http-equiv='Refresh' content='0;URL=$qs&style=2'>
</head>
</html>
";
exit();
}
echo "привет,$login<br>калькулятор:<br>";
if(empty($_GET['calcdo']))
{
echo "<form method='POST' action='$qs&calcdo=go&style=2'>
<input type='text' name='num1' size='5'> + <input type='text' name='num2' size='5'><br>
<input type='text' name='num3' size='5'> - <input type='text' name='num4' size='5'><br>
<input type='text' name='num5' size='5'> * <input type='text' name='num6' size='5'><br>
<input type='text' name='num7' size='5'> / <input type='text' name='num8' size='5'><br>
<input type='submit' value='='><br>
";
}
else
{
$res1=$_POST['num1']+$_POST['num2'];
$res2=$_POST['num3']-$_POST['num4'];
$res3=$_POST['num5']*$_POST['num6'];
$res4=$_POST['num7']/$_POST['num8'];
echo "
$_POST[num1]+$_POST[num2]=$res1<br>
$_POST[num3]-$_POST[num4]=$res2<br>
$_POST[num5]*$_POST[num6]=$res3<br>
$_POST[num7]/$_POST[num8]=$res4<br>
";
}
echo "<br>";
}
?>